package com.sdx.console.spread.service;

import com.ibeetl.admin.core.service.BaseService;
import com.ibeetl.admin.core.util.PlatformException;
import com.sdx.console.spread.dao.SpreadShareDao;
import com.sdx.console.spread.entity.SpreadShare;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName SpreadShareService
 * @Description
 * @Author kangbin
 * @Date 2020/3/20 16:04
 */
@Service
@Transactional
public class SpreadShareService extends BaseService<SpreadShare> {

    @Resource
    private SpreadShareDao spreadShareDao;

    public  PageQuery<SpreadShare> queryByCondition(PageQuery page) {

        PageQuery ret =  spreadShareDao.queryByCondition(page);
        queryListAfter(ret.getList());
        return ret;
    }

    public List<SpreadShare> selectChannels(Integer tenantId){
        return spreadShareDao.selectChannels(tenantId);
    }


}
